Skip to main content

Chart Category Grouping & Sorting

mport ReactPlayer from 'react-player'

Chart Category Grouping & Sorting: This video contains how to use chart category grouping&sorting.

This document contains information on a feature Chart Grouping & Sorting. In OPNBI, Grouping & Sorting is used in Category Axis. We can create a grouping in two types String and Date Time. And create a sorting by column using Ascending or Descending orders. In this Scenario we are using Clustered column Chart widget and in category Axis we are creating Grouping and Sorting. In this example we are creating Grouping in two types String and Date Time. And create a sorting by column using Ascending order.

Docusaurus Slash Introduction

  1. From the right vertical menu select the chart widget icon.
  2. The Edit menu box appears as you click on chart icon. And a widget gets added in content place automatically in dashboard. As shown in the below image.

Docusaurus Slash Introduction

  1. Enter the following details in the edit menu of the chart: Dataset: Sales.ds Category Axis: Country Value Column: extendedPrice Aggregation: Sum
  2. Click on the Grouping & Sorting Docusaurus Slash Introduction Icon in Category Axis, as shown in figure below:

Docusaurus Slash Introduction

  1. In Grouping & Sorting Select the Grouping.
  2. Enter Following details in Grouping. Type: String Group By: Substring [there are number of groups by options available, user can use any function as per requirement] Sort Type: Ascending Sort By Column: country Expression will be added automatically, as shown in figure below:

Docusaurus Slash Introduction

  1. Click on Save Docusaurus Slash Introduction Icon.
  2. Click on Preview and Save and Exit.
  3. In Group by Substring First three letter of country name will be displayed and columns are displayed in ascending order, as shown in figure below:

Docusaurus Slash Introduction

  1. For Date wise Grouping enter following details in Charts. Dataset: Sales Category Axis: OrderDate Value Column: orderNumber Aggregation: Sum
  2. Go to the Category Axis >> Group & Sorting Docusaurus Slash Introduction icon >> Select Grouping.
  3. Enter following details in Grouping. Type: Date Time Group By: DD/MM/YY [there are number of groups by options available, user can use any function as per requirement] Sort Type: Ascending Sort By Column: country Expression will be added automatically, as shown in figure below:

Docusaurus Slash Introduction

  1. Click on Save Docusaurus Slash Introduction icon.
  2. Click on Preview and Save and Exit.
  3. In Category Axis Date will be display in DD/MM/YY format and columns are displayed in ascending order, as shown in figure below:

Docusaurus Slash Introduction

  1. To perform only sorting by Country enter following details in Chart. Dataset: Sales. Ds Category Axis: country Value Column: quantityOrdered Aggregation: Sum
  2. In Category Axis click on Grouping & Sorting Icon.
  3. De-select grouping option
  4. Select Sorting and enter following details in it. Sort Type: Ascending Sort By Column: Country
  5. Fill above details, as shown in figure below:

Docusaurus Slash Introduction

  1. Click on save Docusaurus Slash Introduction icon.
  2. Click on Preview and Save and Exit.
  3. It will display the country name in Ascending order, as shown in figure below:

Docusaurus Slash Introduction